<?php
/**
 * Responsibilities
 * Handle navigation input/output
 * Create links to different parts of the applikation (controllers)
 * Handle navigation-input
 * Create main menu
 */
class NavigationView {
	const USERVIEWSLOGGEDINPAGE = "Loggedin";
	const ADDMEMBER = "addmember";



	public function GetActiveControllerType (){
		if(isset($_REQUEST[self::USERVIEWSLOGGEDINPAGE])){
			return self::USERVIEWSLOGGEDINPAGE;
		}
		else {
			return false;
		}
	}
	
	public function GetActiveSearchType (){
		$searchType = $_POST[MemberView::SEARCH_ALTERNATIVE];
		
		switch ($searchType){
			case MemberView::BOATTYPE;
				return MemberView::BOATTYPE;
				break;
			case MemberView::BOATINFO;
				return MemberView::BOATINFO;
				break;
			case MemberView::BOATLENGTH;
			return MemberView::BOATLENGTH;
			break;
			case MemberView::MEMBERNAME;
				return MemberView::MEMBERNAME;
				break;
			case MemberView::MEMBERSSN;
			return MemberView::MEMBERSSN;
			break;
			default:
				return false;
		}
	}
}
	